package com.fzkj.search.tree;

/**
 * 二叉树
 * @author yaya
 */
public class TreeNode {
    int value;
    TreeNode left;
    TreeNode right;

    public TreeNode() {
    }

    public TreeNode(int value) {
        this.value = value;
    }

    public TreeNode(int value, TreeNode left, TreeNode right) {
        this.value = value;
        this.left = left;
        this.right = right;
    }

    public static TreeNode build(){
        TreeNode root = new TreeNode();
        root.value = 80;
        root.left = new TreeNode(70, new TreeNode(50), new TreeNode(75));
        root.right = new TreeNode(100, new TreeNode(90), new TreeNode(110));
        return root;
    }
}
